<template>
    <div>
        <div>{{content}}</div>
        <h1>{{name}}</h1>
        <a-button @click="changeName('xxx')" type="danger">Primary</a-button>
    </div>
</template>
<script>
import { mapActions, mapState } from 'vuex'
export default {
    data() {
        return {
            content: '我是主页'
        }
    },
    computed: {
        ...mapState('user', ['name'])
    },
    methods: {
        ...mapActions('user', ['changeName'])
    }
}
</script>
<style lang="less" scoped>

</style>